<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class View</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> View</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">default view class. used to render the view (and layout) for the controller</p>
		<p class="notes">
			Located in <a class="field" href="_kata---lib---view.php.html">/kata/lib/view.php</a> (line <span class="field">20</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																																								<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">string</span>
					<a href="#$action" title="details" class="var-name">$action</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">string</span>
					<a href="#$base" title="details" class="var-name">$base</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">object</span>
					<a href="#$controller" title="details" class="var-name">$controller</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">bool</span>
					<a href="#$didConstructHelpers" title="details" class="var-name">$didConstructHelpers</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">string</span>
					<a href="#$elementName" title="details" class="var-name">$elementName</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">mixed</span>
					<a href="#$helperClasses" title="details" class="var-name">$helperClasses</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$helpers" title="details" class="var-name">$helpers</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">string</span>
					<a href="#$layoutName" title="details" class="var-name">$layoutName</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$params" title="details" class="var-name">$params</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$passedVars" title="details" class="var-name">$passedVars</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">string</span>
					<a href="#$webroot" title="details" class="var-name">$webroot</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																								<div class="method-definition">
					<img src="../media/images/Constructor.png" alt=" "/>
											<span class="method-result">View</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">object controller</span>&nbsp;<span class="var-name">&$controller</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#constructHelpers" title="details" class="method-name">constructHelpers</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#render" title="details" class="method-name">render</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$action</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#renderElement" title="details" class="method-name">renderElement</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">an</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#renderLayout" title="details" class="method-name">renderLayout</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$contentForLayout</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$action" id="$action"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$action</span>
						(line <span class="line-number">47</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">name of the action of the current controller the dispatcher called</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$base" id="$base"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$base</span>
						(line <span class="line-number">59</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">base url of this framework</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$controller" id="$controller"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">object</span>
			<span class="var-name">$controller</span>
						(line <span class="line-number">25</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">controller class that the dispatcher called</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$didConstructHelpers" id="$didConstructHelpers"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">bool</span>
			<span class="var-name">$didConstructHelpers</span>
			 = <span class="var-default">false</span>			(line <span class="line-number">94</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">used to stop us from accidently contructing helpers twice</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$elementName" id="$elementName"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$elementName</span>
			 = <span class="var-default">''</span>			(line <span class="line-number">82</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">name of the element that is currently rendered inside the view via $this-&gt;renderElement</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$helperClasses" id="$helperClasses"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$helperClasses</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">76</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array that holds the actual instanciated classes of all constructed helpers for this view</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$helpers" id="$helpers"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$helpers</span>
			 = <span class="var-default">array(&quot;Html&quot;)</span>			(line <span class="line-number">65</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array of helpers you can access inside the view via $this-&gt;helpername</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$layoutName" id="$layoutName"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$layoutName</span>
			 = <span class="var-default">''</span>			(line <span class="line-number">88</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">name of the layout we are rendering to</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$params" id="$params"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$params</span>
						(line <span class="line-number">41</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array which holds all relevant information for the current view:</p>
<p class="description"><p>[isAjax] =&gt; false (boolean, tells you if view got called with /ajax/)  [url] =&gt; Array (        [url] =&gt; locations        [foo] =&gt; bar (if url read ?foo=bar)  )  [form] =&gt; Array (  	  (all post-variables, automatically dequoted if needed)  )  [controller] =&gt; main (name of the controller of this request)  [action] =&gt; index (name of the view of this request)</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$passedVars" id="$passedVars"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$passedVars</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">71</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">array of all variables we got passed from the controller via set() or setRef()</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$webroot" id="$webroot"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$webroot</span>
						(line <span class="line-number">53</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">absolute filesystem path to the webroot folder</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">100</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">constructor. copies all needed variables from the controller</p>
	
	<div class="method-signature">
		<span class="method-result">View</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">object controller</span>&nbsp;<span class="var-name">&$controller</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object controller</span>
				<span class="var-name">&$controller</span><span class="var-description">: that uses this view</span>			</li>
				</ul>
		
			
	</div>
<a name="methodconstructHelpers" id="constructHelpers"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">constructHelpers</span> (line <span class="line-number">113</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">construct all helpers we found in our helpers property</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			constructHelpers
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrender" id="render"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">render</span> (line <span class="line-number">155</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">render the actual view and layout. normally done at the end of a action of a controller</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-num">1.&nbsp;</span><span class="src-id">all&nbsp;<a href="../kata_view/View.html#var$helpers">helpers</a>&nbsp;are&nbsp;constructed&nbsp;here</span><span class="src-sym">,&nbsp;</span><span class="src-id">very&nbsp;late</span><span class="src-sym">,&nbsp;</span><span class="src-id">so&nbsp;we&nbsp;dont&nbsp;accidently&nbsp;waste&nbsp;cpu&nbsp;cycles</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">2.&nbsp;</span><span class="src-id">all&nbsp;variables</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../kata_view/View.html#var$helpers">helpers</a>&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-id"><a href="../kata_view/View.html#var$params">params</a>&nbsp;given&nbsp;from&nbsp;the&nbsp;<a href="../kata_view/View.html#var$controller">controller</a>&nbsp;are&nbsp;extracted&nbsp;to&nbsp;</span><span class="src-key">global&nbsp;</span><span class="src-id">namespace</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">3.&nbsp;</span><span class="src-id">the&nbsp;actual&nbsp;view</span>-<span class="src-id">template&nbsp;</span><a href="../kata_internal/_kata---lib---basics.php.html#functionis">is</a>&nbsp;<span class="src-id">rendered</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">4.&nbsp;</span><span class="src-id">the&nbsp;content&nbsp;of&nbsp;the&nbsp;rendered&nbsp;view&nbsp;</span><a href="../kata_internal/_kata---lib---basics.php.html#functionis">is</a>&nbsp;<span class="src-id">rendered&nbsp;into&nbsp;the&nbsp;layout</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> html of the view</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			render
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$action</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$action</span><span class="var-description">: name of the view</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$layout</span><span class="var-description">: name of the layout</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrenderElement" id="renderElement"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">renderElement</span> (line <span class="line-number">219</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">render a element and return the resulting html. an element is kind of like a mini-view you can use inside a view (via $this-&gt;renderElement()).</p>
<p class="description"><p>it has (like a view) access to all variables a normal view has</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			renderElement
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">an</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: name of the element (see views/elements/) without .thtml</span>			</li>
					<li>
				<span class="var-type">an</span>
				<span class="var-name">$params</span><span class="var-description">: array of variables the element can access in global namespace</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrenderLayout" id="renderLayout"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">renderLayout</span> (line <span class="line-number">191</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">renders the given string into the layout. normally called by renderView()</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-num">1.&nbsp;</span><span class="src-id">title&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-id">content&nbsp;are&nbsp;extracted&nbsp;into&nbsp;</span><span class="src-key">global&nbsp;</span><span class="src-id">namespace</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">2.&nbsp;</span><span class="src-id">all&nbsp;variables</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../kata_view/View.html#var$helpers">helpers</a>&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-id"><a href="../kata_view/View.html#var$params">params</a>&nbsp;given&nbsp;from&nbsp;the&nbsp;<a href="../kata_view/View.html#var$controller">controller</a>&nbsp;are&nbsp;extracted&nbsp;to&nbsp;</span><span class="src-key">global&nbsp;</span><span class="src-id">namespace</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">3.&nbsp;</span><span class="src-id">the&nbsp;given&nbsp;string&nbsp;</span><a href="../kata_internal/_kata---lib---basics.php.html#functionis">is</a>&nbsp;<span class="src-id">rendered&nbsp;into&nbsp;the&nbsp;layout</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-num">4.&nbsp;</span><span class="src-id">the&nbsp;html</span>-<span class="src-id">output&nbsp;of&nbsp;this&nbsp;routine&nbsp;normally&nbsp;lands&nbsp;in&nbsp;the&nbsp;controllers&nbsp;output&nbsp;property</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			renderLayout
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$contentForLayout</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$contentForLayout</span><span class="var-description">: raw html to be rendered to the layout (normally the content of a view)</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$layout</span><span class="var-description">: name of the layout</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Wed, 02 Sep 2009 11:03:26 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>